package com.xiaohao.student_course.controller;

import com.xiaohao.student_course.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-12-18 00:10
 * @package com.xiaohao.student_course.controller
 * @description
 */
@Controller
@RequestMapping("/major")
public class MajorController {
    @Autowired
    private MajorService majorService;
    @RequestMapping("/query")
    public String getAllMajor(Model model){
        model.addAttribute("majorQueryPage",majorService.getAllMajor());
        model.addAttribute("majorQueryPage",majorService.getAllMajor());
        model.addAttribute("majorQueryPage",majorService.getAllMajor());
        return "major-query";

    }
}
